package com.bestcem.xm.award.grpc.service.param.draw;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 分页参数
 *
 * @author hang.li <hang.li@idiaoyan.com>
 * @version v1.0
 * @date 2021/7/12 14:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageParam {

    /**
     * 页号
     */
    @NotNull(message = "页号不能为空")
    @Min(value = 0, message = "页号不能小于0")
    private Integer page;

    /**
     * 分页大小
     */
    @NotNull(message = "每页大小不能为空")
    @Min(value = 0, message = "每页大小不能小于0")
    @Max(value = 1000, message = "每页大小不能大于1000")
    private Integer size;
}
